package com.vf.admin.miaodong.dao;

import com.vf.admin.common.db.BaseDao;
import com.vf.admin.common.splitpage.SplitPageBean;
import com.vf.admin.miaodong.entity.AppBanner;
import com.vf.admin.miaodong.entity.Zhiding;
import com.vf.admin.utils.StringEx;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Repository
public class ZhidingDao extends BaseDao<Zhiding> {

    /**
     * 查询列表
     */
    public List<Zhiding> listByUserId(Integer tengxuncode) {
        ArrayList<Object> paramList = new ArrayList<>();
        StringBuilder sbStr = new StringBuilder("select * from zhiding where tengxuncode = "+ tengxuncode);

        String sql = sbStr.toString();
        return this.queryList(sql, paramList, Zhiding.class);
    }


    /**
     * 删除
     */
    public void del(Integer tengxuncode, Integer totengxuncode) {
        String sql = "delete from zhiding where tengxuncode = " + tengxuncode + " and totengxuncode="+ totengxuncode;
        ArrayList<Object> paramList = new ArrayList<Object>();
        this.del(sql, paramList);
    }

}
